package com.bifrost.cbentity;

import javax.persistence.*;

/**
 * @author rangf
 * @date 2018/2/27
 */
@Entity
@Table(name = "BHWSC_SP")
public class SapProduct {
    private String matnr;
    private String maktx;
    private String groes;
    private String meins;
    private String matkl;
    private String zzppbm;
    private String ean11;
    private String mtart;
    private String bismt;
    private String maktm;
    private String zzgg2;
    private String zzcd;
    private String size1;
    private String color;
    private String taklv;
    private String zzsfjj;
    private String dstatus;
    private String ddate;
    private Long noid;
    private String zzsqyt;

    @Basic
    @Column(name = "MATNR", nullable = true, length = 18)
    public String getMatnr() {
        return matnr;
    }

    public void setMatnr(String matnr) {
        this.matnr = matnr;
    }

    @Basic
    @Column(name = "MAKTX", nullable = true, length = 80)
    public String getMaktx() {
        return maktx;
    }

    public void setMaktx(String maktx) {
        this.maktx = maktx;
    }

    @Basic
    @Column(name = "GROES", nullable = true, length = 64)
    public String getGroes() {
        return groes;
    }

    public void setGroes(String groes) {
        this.groes = groes;
    }

    @Basic
    @Column(name = "MEINS", nullable = true, length = 6)
    public String getMeins() {
        return meins;
    }

    public void setMeins(String meins) {
        this.meins = meins;
    }

    @Basic
    @Column(name = "MATKL", nullable = true, length = 9)
    public String getMatkl() {
        return matkl;
    }

    public void setMatkl(String matkl) {
        this.matkl = matkl;
    }

    @Basic
    @Column(name = "ZZPPBM", nullable = true, length = 6)
    public String getZzppbm() {
        return zzppbm;
    }

    public void setZzppbm(String zzppbm) {
        this.zzppbm = zzppbm;
    }

    @Basic
    @Column(name = "EAN11", nullable = true, length = 18)
    public String getEan11() {
        return ean11;
    }

    public void setEan11(String ean11) {
        this.ean11 = ean11;
    }

    @Basic
    @Column(name = "MTART", nullable = true, length = 4)
    public String getMtart() {
        return mtart;
    }

    public void setMtart(String mtart) {
        this.mtart = mtart;
    }

    @Basic
    @Column(name = "BISMT", nullable = true, length = 18)
    public String getBismt() {
        return bismt;
    }

    public void setBismt(String bismt) {
        this.bismt = bismt;
    }

    @Basic
    @Column(name = "MAKTM", nullable = true, length = 40)
    public String getMaktm() {
        return maktm;
    }

    public void setMaktm(String maktm) {
        this.maktm = maktm;
    }

    @Basic
    @Column(name = "ZZGG2", nullable = true, length = 40)
    public String getZzgg2() {
        return zzgg2;
    }

    public void setZzgg2(String zzgg2) {
        this.zzgg2 = zzgg2;
    }

    @Basic
    @Column(name = "ZZCD", nullable = true, length = 12)
    public String getZzcd() {
        return zzcd;
    }

    public void setZzcd(String zzcd) {
        this.zzcd = zzcd;
    }

    @Basic
    @Column(name = "SIZE1", nullable = true, length = 18)
    public String getSize1() {
        return size1;
    }

    public void setSize1(String size1) {
        this.size1 = size1;
    }

    @Basic
    @Column(name = "COLOR", nullable = true, length = 18)
    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    @Basic
    @Column(name = "TAKLV", nullable = true, length = 2)
    public String getTaklv() {
        return taklv;
    }

    public void setTaklv(String taklv) {
        this.taklv = taklv;
    }

    @Basic
    @Column(name = "ZZSFJJ", nullable = true, length = 1)
    public String getZzsfjj() {
        return zzsfjj;
    }

    public void setZzsfjj(String zzsfjj) {
        this.zzsfjj = zzsfjj;
    }

    @Basic
    @Column(name = "DSTATUS", nullable = true, length = 1)
    public String getDstatus() {
        return dstatus;
    }

    public void setDstatus(String dstatus) {
        this.dstatus = dstatus;
    }

    @Basic
    @Column(name = "DDATE", nullable = true, length = 14)
    public String getDdate() {
        return ddate;
    }

    public void setDdate(String ddate) {
        this.ddate = ddate;
    }

    @Id
    @SequenceGenerator(name= "sequence",sequenceName="sequence_product" ,allocationSize=1)
    @GeneratedValue(generator= "sequence",strategy= GenerationType.SEQUENCE)
    @Column(name = "NOID", nullable = false, precision = 0)
    public Long getNoid() {
        return noid;
    }

    public void setNoid(Long noid) {
        this.noid = noid;
    }

    @Basic
    @Column(name = "ZZSQYT", nullable = true, length = 1)
    public String getZzsqyt() {
        return zzsqyt;
    }

    public void setZzsqyt(String zzsqyt) {
        this.zzsqyt = zzsqyt;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SapProduct that = (SapProduct) o;

        if (noid != that.noid) return false;
        if (matnr != null ? !matnr.equals(that.matnr) : that.matnr != null) return false;
        if (maktx != null ? !maktx.equals(that.maktx) : that.maktx != null) return false;
        if (groes != null ? !groes.equals(that.groes) : that.groes != null) return false;
        if (meins != null ? !meins.equals(that.meins) : that.meins != null) return false;
        if (matkl != null ? !matkl.equals(that.matkl) : that.matkl != null) return false;
        if (zzppbm != null ? !zzppbm.equals(that.zzppbm) : that.zzppbm != null) return false;
        if (ean11 != null ? !ean11.equals(that.ean11) : that.ean11 != null) return false;
        if (mtart != null ? !mtart.equals(that.mtart) : that.mtart != null) return false;
        if (bismt != null ? !bismt.equals(that.bismt) : that.bismt != null) return false;
        if (maktm != null ? !maktm.equals(that.maktm) : that.maktm != null) return false;
        if (zzgg2 != null ? !zzgg2.equals(that.zzgg2) : that.zzgg2 != null) return false;
        if (zzcd != null ? !zzcd.equals(that.zzcd) : that.zzcd != null) return false;
        if (size1 != null ? !size1.equals(that.size1) : that.size1 != null) return false;
        if (color != null ? !color.equals(that.color) : that.color != null) return false;
        if (taklv != null ? !taklv.equals(that.taklv) : that.taklv != null) return false;
        if (zzsfjj != null ? !zzsfjj.equals(that.zzsfjj) : that.zzsfjj != null) return false;
        if (dstatus != null ? !dstatus.equals(that.dstatus) : that.dstatus != null) return false;
        if (ddate != null ? !ddate.equals(that.ddate) : that.ddate != null) return false;
        if (zzsqyt != null ? !zzsqyt.equals(that.zzsqyt) : that.zzsqyt != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = matnr != null ? matnr.hashCode() : 0;
        result = 31 * result + (maktx != null ? maktx.hashCode() : 0);
        result = 31 * result + (groes != null ? groes.hashCode() : 0);
        result = 31 * result + (meins != null ? meins.hashCode() : 0);
        result = 31 * result + (matkl != null ? matkl.hashCode() : 0);
        result = 31 * result + (zzppbm != null ? zzppbm.hashCode() : 0);
        result = 31 * result + (ean11 != null ? ean11.hashCode() : 0);
        result = 31 * result + (mtart != null ? mtart.hashCode() : 0);
        result = 31 * result + (bismt != null ? bismt.hashCode() : 0);
        result = 31 * result + (maktm != null ? maktm.hashCode() : 0);
        result = 31 * result + (zzgg2 != null ? zzgg2.hashCode() : 0);
        result = 31 * result + (zzcd != null ? zzcd.hashCode() : 0);
        result = 31 * result + (size1 != null ? size1.hashCode() : 0);
        result = 31 * result + (color != null ? color.hashCode() : 0);
        result = 31 * result + (taklv != null ? taklv.hashCode() : 0);
        result = 31 * result + (zzsfjj != null ? zzsfjj.hashCode() : 0);
        result = 31 * result + (dstatus != null ? dstatus.hashCode() : 0);
        result = 31 * result + (ddate != null ? ddate.hashCode() : 0);
        result = 31 * result + (int) (noid ^ (noid >>> 32));
        result = 31 * result + (zzsqyt != null ? zzsqyt.hashCode() : 0);
        return result;
    }
}
